package com.borko.healthcare.persistence.hibernate.services;

import java.util.List;

import com.borko.healthcare.entities.interfaces.Pharmacist;
import com.borko.healthcare.persistence.hibernate.dao.PharmacistDAO;

public class PharmacistManagerImpl implements PharmacistManager {
	
	private PharmacistDAO pharmacistDAO;

	public PharmacistDAO getSupplierDAO() {
		return this.pharmacistDAO;
	}

	public void setPharmacistDAO(PharmacistDAO pharmacistDAO) {
		this.pharmacistDAO = pharmacistDAO;
	}

	public void add(Pharmacist pharmacist) {
		pharmacistDAO.create(pharmacist);
	}

	public void applyChanges(Pharmacist pharmacist) {
		pharmacistDAO.update(pharmacist);
	}

	public List<Pharmacist> list() {
		return pharmacistDAO.retrive();
	}

	public void remove(Pharmacist pharmacist) {
		pharmacistDAO.delete(pharmacist);
	}

	public Pharmacist getPharmacist(int id) {
		return pharmacistDAO.getPharmacist(id);
	}

}
